<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of OgCssLinkelement
 * @todo dokumentaci k tydle blbosti
 * @author Martin
 */
class OgCssLink implements OgElementInterface {

  private $href;
  /**
   *
   * @var OgElement
   */
  private $linkEl;

  /**
   *
   * @param <type> $_href
   */
  public function  __construct($_href) {
    $this->href = $_href;
    $this->initComponents();
  }

  public function getTagName() {
    return $this->linkEl->getTagName();
  }

  public function getInnerHtml() {
    return $this->linkEl->getInnerHtml();
  }

  public function mergeAttributes() {
    return $this->linkEl->mergeAttributes();
  }

  protected function initComponents() {
    $this->linkEl = new OgElement('link');
    $this->linkEl->addAttribute('type', 'text/css');
    $this->linkEl->addAttribute('rel', 'stylesheet');
    $this->linkEl->addAttribute('href', $this->href);
  }
}
?>
